Repository navigation
fix(gh-aw): preserve bootstrap candidate through resolved validation - #2158
Conversation
The resolved-link validation ran after the candidate tree was deleted, so every builtin, evidence, and payload path reported missing. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Execute the live writer with real candidate validation through Cast provenance, linked proposals, and research comments. Cover success, early returns, API failure, and a premature-cleanup mutation. Verified the happy path fails against pre-fix dev source. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
🟡 Impact Analysis — PR #2158Risk tier: 🟡 MEDIUM 📊 Summary
🎯 Risk Factors
📦 Modules Affectedroot (3 files)
tests (1 file)
This report is generated automatically for every PR. See #733 for details. |
🛫 PR Readiness Check
PR Scope: 🔧 Infrastructure
|
| Status | Check | Details |
|---|---|---|
| ❌ | Single commit | 2 commits — consider squashing before review |
| ✅ | Not in draft | Ready for review |
| ✅ | Branch up to date | Up to date with dev |
| ❌ | Copilot review | No Copilot review yet — it may still be processing |
| ✅ | Changeset present | No source files changed — changeset not required |
| ✅ | Scope clean | No .squad/ or docs/proposals/ files |
| ✅ | No merge conflicts | No merge conflicts |
| ✅ | Copilot threads resolved | No Copilot review threads |
| ✅ | CI passing | All checks passing |
Files Changed (4 files, +876 −692)
| File | +/− |
|---|---|
test/gh-aw-bootstrap-workflow.test.ts |
+187 −3 |
workflows/package/squad-bootstrap.md |
+343 −343 |
workflows/squad-bootstrap.md |
+343 −343 |
workflows/squad-workflows.manifest.json |
+3 −3 |
Total: +876 −692
This check runs automatically on every push. Fix any ❌ items and push again.
See CONTRIBUTING.md and PR Requirements for details.
There was a problem hiding this comment.
🔵 Needs a closer look
The workflow logic appears consistent, but full CI validation remains pending for an operationally sensitive bootstrap path.
0 open findings
What changed in this PR
Preserves the bootstrap candidate until all validation and artifact creation complete, while guaranteeing cleanup.
Changes:
- Extends candidate cleanup across the full writer lifecycle.
- Adds realistic lifecycle and mutation regression tests.
- Regenerates packaged workflow and integrity digests.
| File | Description |
|---|---|
workflows/squad-bootstrap.md |
Moves cleanup to the final lifecycle boundary. |
workflows/package/squad-bootstrap.md |
Regenerates the packaged workflow. |
workflows/squad-workflows.manifest.json |
Updates workflow integrity digests. |
test/gh-aw-bootstrap-workflow.test.ts |
Tests candidate lifetime and cleanup paths. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
What
Keep the isolated bootstrap candidate alive through resolved-link validation, Cast provenance, proposals-issue creation, and research-comment creation; remove it in the final
finallyon success, early returns, and errors. Add executable regression coverage and regenerate the package workflow and manifest digests. Working as agentic-workflows-dev (Agentic Workflows Engineer).Why
The writer removed the candidate immediately after placeholder validation. Later resolved validation recreated only the payload JSON, so every builtin resource, evidence path, and generated Cast file was missing. No matching cleanup issue was identified; no fabricated closing reference is included.
How
Extend the existing try/finally around the complete writer lifecycle without changing API permissions, recovery policy, branch replacement, or proposal/research semantics. Tests execute the live YAML writer with real filesystem materialization and real bootstrap validators; only GitHub API responses are simulated. Existing extracted-block tests now derive indentation because the writer is nested in the longer try block.
Exact validation commands/results (local npm registry configured with
npm config set registry "https://packagefeedproxy.microsoft.io/npm/"; isolated proxy-installed Vitest 3.2.4 used after root restore failed):npm test -- test/gh-aw-bootstrap-workflow.test.ts -t 'keeps the real candidate'against the actual pre-fixdevwriter: FAILED as required at resolved validation, naming missing.github/workflows/shared/builtins/scribe-charter.md, evidencepackage.json, generated.squad/team.md, and other candidate paths. Source selection was restored before committing.npm test -- test/gh-aw-bootstrap-workflow.test.ts -t 'candidate lifetime': PASSED, 5/5. Covers full happy path through provenance, resolved issue link, research comment, complete cleanup; opt-out and permission-denied early returns; propagated post-validation API error; realistic source mutation restoring premature cleanup with missing-path diagnostics.npm test -- test/gh-aw-bootstrap-workflow.test.ts: 50 passed, 2 failed. Strict compilation and compiled contract/mutation tests passed. The two failures are existing POSIX proxy fixtures on Windows: shell runner statusnull, andspawnSync safeoutputs ENOENTinstead of the expected proxy error.npm test -- test/gh-aw-bootstrap-workflow.test.ts -t 'submits seven chunks|fails explicitly without retries'against the actual pre-fix writer: same 2 failures reproduced. These unrelated fixtures were not changed.node workflows\shared\squad-install-verifier.mjs --root <LF scratch archive> --write-sourceandnode workflows\shared\squad-install-verifier.mjs --root <LF scratch archive> --check-source: PASSED. Used an LF-normalized archive in session artifacts because the Windows worktree's CRLF frontmatter breaks the existing renderer. Regenerated package bootstrap and manifest matched committed files exactly after EOL normalization; no unrelated EOL changes committed.npm ci --ignore-scripts --no-audit --no-fund: FAILED, required Microsoft proxy returned 404 foreslint-plugin-n-18.4.0.tgz.$env:SKIP_BUILD_BUMP='1'; npm run build: FAILED after bounded isolated TypeScript 6.0.3 /@types/node26.6.3 recovery: TS2307 missing@github/copilot-sdk,ws,@opentelemetry/api,sql.js, and consequent implicit-any errors. No version churn; no further dependency repair.git diff --cached --stat,git diff --cached --diff-filter=D --name-only, andgit diff --cached --check: PASSED, intended scope only, no file deletions or whitespace errors.npm test,npm run lint, andnpm run lint:eslint: not run, dependency restore blocked; CI must validate.Fresh hosted happy-path evidence supplied by the bootstrap diagnosis workstream; each run succeeded with Cast PR #2 and research-proposals issue #3. These demonstrate fresh bootstrap only, not rerun recovery:
Commits:
e1f2d4e4bb785ed8a2424f749b24b91880bfe14f(fix/generated metadata),e6857f4824650866224bd64c1dd54407c8e47902(regressions). Reviewed applicable reviewer, architecture, and security checklists: no new permissions, dependencies, public exports, or input-authorization changes. No downstream installs, resets, force pushes, or merge authorization.npx changeset add/.changeset/*.md, directCHANGELOG.mdentry for maintainers, orskip-changeloglabel for no user-facing changes)N/A: no SDK/CLI source or package-template changes; workflow/test paths do not trigger the changeset gate.
PR Readiness Checklist
Branch & Commit
dev(notmain)dev(git fetch upstream && git rebase upstream/dev)git diff --cached --stat)Started from fetched
origin/devcommitcc90916b; this PR targetsdev, not the diagnosis feature branch. Intentionally draft pending CI.Build & Test
npm run buildpassesnpm testpasses (all tests green)npm run lintpasses (type check clean)npm run lint:eslintpassesBuild and full validation remain pending CI for the reasons above. Migration item N/A: four files.
Changeset
npx changeset add(ifpackages/squad-sdk/src/orpackages/squad-cli/src/changed)CHANGELOG.mdentry (maintainers only — write-protected for external contributors)skip-changeloglabel applied (if no user-facing changes)N/A: infrastructure workflow/test change, no gated product-source/template paths. No skip label applied.
Docs
N/A: fixes existing workflow behavior; no new feature/module or public API.
Exports
N/A: no SDK changes or new modules.
Breaking Changes
None.
Waivers
User explicitly approved “Open a draft PR and let CI validate (Recommended)” after receiving the dependency-restore proxy 404 and two baseline Windows failures. This waives build-before-push for this PR only, not build/test requirements before merge. Draft must remain unmerged until CI and reviewer gates are satisfied. No merge or auto-merge requested.